<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta name="referrer" content="no-referrer" /> <!--img标签预加载网络图片-->
  <title>管理电影</title>

  <!-- Favicons -->
  <link href="/static/assets/img/tubiao.png" rel="icon">

  <!-- Vendor CSS Files -->
  <link href="/static/assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="/static/assets/vendor/icofont/icofont.min.css" rel="stylesheet">
  <link href="/static/assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="/static/assets/vendor/animate.css/animate.min.css" rel="stylesheet">
  <link href="/static/assets/vendor/venobox/venobox.css" rel="stylesheet">
  <link href="/static/assets/vendor/aos/aos.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="/static/assets/css/style.css" rel="stylesheet">

</head>

<body>
    <script type="text/javascript"
            src="..//static/assets/js/jquery-2.2.1.min.js">

    </script>
    <script type="text/javascript"
            src="..//static/assets/js/bootstrap-table.js">
    </script>
        <link rel="stylesheet" href="..//static/assets/css/bootstrap-table.scss">

      <!-- ======= Header ======= -->
    <header id="header">
      <div class="container">
        <div class="logo float-left">
          <h1 class="text-light"><a><span>管理电影</span></a></h1>
        </div>
        <nav class="nav-menu float-right d-none d-lg-block">
          <ul>
            <li class="active"><a href="/manage_movie">manage movie</a></li>
            <li><a href="/manage_user">manage user</a></li>
          </ul>
        </nav><!-- .nav-menu -->
      </div>
    </header><!-- End Header -->

    <!-- ======= Our Team Section ======= -->
    <section id="team" class="team">
      <div class="container">
        <div class="section-title">
          <h2>管理电影</h2>
        </div>
      </div>
    </section><!-- End Our Team Section -->

    <section class="counts section-bg">
      <div class="container">
        <a href="/add_movie" class="btn btn-primary">新增电影</a><br><br>
        <table class="table table-bordered" id="table_page">
          <tr>
            <td>id</td>
            <td>电影名</td>
            <td>电影海报</td>
            <td>演员介绍</td>
            <td>评分</td>
            <td>评价人数</td>
            <td>年份、国家、类型</td>
            <td>豆瓣有无资源</td>
            <td>操作</td> <!-- 添加操作列 -->
          </tr>
          {% for movie in movies %}
          <tr>
            <td>{{ movie[0] }}</td>
            <td>
              <a href="{{ movie[1] }}">
                {{ movie[3] }}
              </a>
            </td>
            <td><img src="{{ movie[2] }}" width="180" height="280"></td>
            <td>{{ movie[4] }}</td>
            <td>{{ movie[5] }}</td>
            <td>{{ movie[6] }}</td>
            <td>{{ movie[7] }}</td>
            <td>{{ movie[8] }}</td>
            <td>
              <br><br><a href="/edit_movie/{{ movie[0] }}" class="btn btn-primary btn-sm">编辑</a><br><br>
              <a href="/delete_movie/{{ movie[0] }}" class="btn btn-danger btn-sm">删除</a>
            </td> <!-- 编辑和删除按钮 -->
          </tr>
          {% endfor %}
        </table>
      </div>
    </section>

  </main><!-- End #main -->

  <!-- ======= Footer ======= -->
  <footer id="footer">
    <div class="container">
      <div class="copyright">Copyright &copy; 2023.Movies name All rights reserved.<a target="_blank" ></a></div>
      <div class="credits"></div>
    </div>
  </footer><!-- End Footer -->

  <a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>

  <!-- Vendor JS Files -->
  <script src="/static/assets/vendor/jquery/jquery.min.js"></script>
  <script src="/static/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="/static/assets/vendor/jquery.easing/jquery.easing.min.js"></script>
  <script src="/static/assets/vendor/jquery-sticky/jquery.sticky.js"></script>
  <script src="/static/assets/vendor/venobox/venobox.min.js"></script>
  <script src="/static/assets/vendor/waypoints/jquery.waypoints.min.js"></script>
  <script src="/static/assets/vendor/counterup/counterup.min.js"></script>
  <script src="/static/assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
  <script src="/static/assets/vendor/aos/aos.js"></script>

  <!-- Template Main JS File -->
  <script src="/static/assets/js/main.js"></script>

</body>

</html>